﻿using NHibernate;
using ParaEditor.Domain.Entities;

namespace ParaEditor.Test
{
    public class NHibernateSamples
    {
        protected ISession Session { get; set; }
        public NHibernateSamples(ISession session)
        {
            Session = session;
        }

        public Para3006 GetCustomerById(int customerId)
        {
            return Session.Get<Para3006>(customerId);
        }

        public void CreateCustomer(Para3006 customer)
        {
            Session.Save(customer);
            Session.Flush();
        }
    }
}
